package com.guigu.msm.utils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;


/**
 * @ClassName:MsmProperiestUtils
 * @Description:获取属性
 * @Author:longtao
 * @Date:2021/8/6
 * @Version:1.0
 */
@Component
public class MsmPropertiesUtils implements InitializingBean{
    //唯一标识
    @Value("${aliyun.phone.appCode}")
    private  String appCode;
    //调用地址
    @Value("${aliyun.phone.host}")
    private  String host;
    //调用接口
    @Value("${aliyun.phone.path}")
    private  String path;
    //请求方法
    @Value("${aliyun.phone.method}")
    private  String method;
    //模板id
    @Value("${aliyun.phone.template-id}")
    private  String template_id;


    public static String APPCODE;
    public static String HOST;
    public static String PATH;
    public static String METHOD;
    public static String TEMPLATE_ID;

    @Override
    public void afterPropertiesSet() throws Exception {
        APPCODE=appCode;
        HOST=host;
        PATH=path;
        METHOD=method;
        TEMPLATE_ID=template_id;
    }
}
